'use strict';
import React,{Component} from 'react';
import MyCommission from './commission/myCommission';//我的佣金
import {
    View,
    Text,
    TouchableOpacity,
    Image,
    StyleSheet
} from 'react-native';
export default class userBouns extends Component{
    // 构造
      constructor(props) {
        super(props);
        // 初始状态
        this.state = {};
      }

    linkJump(component){
          this.props.navigator.push({
              component:component,
              passProps:{
                  user_id:this.props.user_id,
                  income_type:14
              }
          })
    }


      render(){
          return(
              <View style={{backgroundColor:"#fff",marginTop:10}}>
                  <View style={styles.header_view}>
                      <Image
                          source={require('../imgs/center_icon19.png')}
                          style={{width:25,height:25,marginRight:5}}
                          resizeMode={'cover'}
                      />
                      <Text style={{fontSize:14,color:"#333"}}>配送佣金管理</Text>
                  </View>
                  <TouchableOpacity onPress={()=>this.linkJump(MyCommission)} style={styles.income_view}>
                      <View style={styles.rows_txt}>
                          <Text style={styles.rmb_icon}>¥</Text>
                          <Text style={{fontSize:24,color:"#f00"}}>{this.props.income}</Text>
                      </View>
                      <Text style={{fontSize:14,color:"#696969"}}>配送佣金</Text>
                  </TouchableOpacity>
              </View>
          )
      }
}
var styles = StyleSheet.create({
    header_view:{
        height:40,
        paddingHorizontal:10,
        borderBottomColor:"#e0e0e0",
        borderBottomWidth:1,
        flexDirection:'row',
        alignItems:'center'
    },
    income_view:{
        alignItems:'center',
        justifyContent:'center',
        height:100
    },
    rows_txt:{
        flexDirection:'row',
        alignItems:'center',
    },
    rmb_icon:{
        fontSize:16,
        color:'#f00',
        marginTop:4,
        marginRight:5
    }
})